package to;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity
@Table(name = "tbl_solicitacao_determinacao")
public class SolicitacaoDeterminacao implements Serializable {
	private static final long serialVersionUID = 8955668534910389446L;

	@Id
	@GeneratedValue
	private Integer codigo;

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade({ CascadeType.DELETE_ORPHAN, CascadeType.PERSIST })
	private SolicitacaoDeAnalise solicitacao;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_amostra", nullable = false)
	private Amostra amostra;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_determinacao", nullable = false)
	private Determinacao determinacao;
	

	public Integer getCodigo() {
		return codigo;
	}

	public void setCodigo(Integer codigo) {
		this.codigo = codigo;
	}

	public SolicitacaoDeAnalise getSolicitacao() {
		return solicitacao;
	}

	public void setSolicitacao(SolicitacaoDeAnalise solicitacao) {
		this.solicitacao = solicitacao;
	}

	public Amostra getAmostra() {
		return amostra;
	}

	public void setAmostra(Amostra amostra) {
		this.amostra = amostra;
	}

	public Determinacao getDeterminacao() {
		return determinacao;
	}

	public void setDeterminacao(Determinacao determinacao) {
		this.determinacao = determinacao;
	}

	public Object getModel() {
		// TODO Auto-generated method stub
		return null;
	}

}
